<%--
  Created by IntelliJ IDEA.
  User: 97203
  Date: 2018/06/08
  Time: 15:05
  To change this tmarketlate use File | Settings | File Tmarketlates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="/static/plugins/jquery/jquery.js"></script>
    <script type="text/javascript" src="/static/plugins/echart/echarts.common.min.js"></script>
    <script type="text/javascript" src="/static/js/market.js"></script>
    <%@include file="/static/common/common.jsp" %>
    <script type="text/javascript">

        $(function () {
            $(".chart").click(function () {
                var url = $(this).data("url");
                $("#win").window({
                    title : '销售报表',
                    width:600,
                    height:400,
                    href: url+"?groupType="+$("#groupType").combobox('getValue')+"&"+$("#searchForm").serialize(),
                    cache:false,
                    modal:true,
                    onLoad: function() {

                    },
                    onClose : function() {

                    }
                });
            })

        })
    </script>
</head>
<body>
<table id="market_datagrid"></table>

<div id="tb">
    <div>
        <form id="searchForm" action="/chart/sale.do" method="post">
            机构:<input name="organizationId" class="easyui-combobox" prompt="请选择" fit="true"
                      data-options="textField:'name',valueField:'id',panelHeight:'auto',
                                    url:'/organization/selectAll.do'">
            险种:<input name="productId" class="easyui-combobox" prompt="请选择" fit="true"
                   data-options="textField:'name',valueField:'id',panelHeight:'auto',
                                    url:'/product/selectAll.do'">
            保单时间:<input id="beginTime" name="beginTime" class="easyui-datebox"  prompt="请输入开始日期">~
            <input id="endTime" name="endTime" class="easyui-datebox"  prompt="请输入结束日期">
        </form>
        <div>
            <%--分组:<input name="deptId" class="easyui-combobox" prompt="请选择" fit="true"--%>
                      <%--data-options="textField:'name',valueField:'id',panelHeight:'auto',--%>
                                <%--url:'/department/selectAll.do'">--%>

                分组:<select id="groupType" class="easyui-combobox" name="groupType" style="width:170px;">
                <option value="e.username">销售人员</option>
                <option value="o.name">保险机构</option>
                <option value="p.name">保险产品</option>
                <option value="yy">保险日期(月)</option>
                <option value="dd">保险日期(日)</option>
            </select>
            <a href="#" class="easyui-linkbutton chart" data-options="iconCls:'icon-large-chart',plain:true" data-url="/market/saleByBar.do">柱状图</a>
            <a href="#" class="easyui-linkbutton chart" data-options="iconCls:'icon-large-shapes',plain:true" data-url="/market/saleByPic.do">饼状图</a>

           <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" data-cmd="query">查询</a>
          <%--<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>--%>

            <div id="win"></div>

        </div>
    </div>


</div>
<div id="market_dialog">
    <form id="market_form" method="post">
        <input id="marketId" name="id" type="hidden">
        <table align="center" style="margin: 15px;">
            <tr>
                <td>姓名：</td>
                <td><input type="text" name="employee.id" class="easyui-combobox"  prompt="请选择姓名"
                           data-options="textField:'username',valueField:'id',panelHeight:'auto',
                                url:'/employee/selectAll.do'"></td>
            </tr>
            <tr>
                <td>编号：</td>
                <td><input type="text" name="sn" class="easyui-textbox"></td>
            </tr>
            <tr>
                <td>时间：</td>
                <td><input type="text" name="date" class="easyui-datebox"></td>
            </tr>
            <tr>
                <td>部门：</td>
                <td><input type="text" name="dept.id" class="easyui-combobox" prompt="请选择部门"
                           data-options="textField:'name',valueField:'id',panelHeight:'auto',
                                url:'/department/selectAll.do'"></td>
            </tr>
            <tr>
                <td>内容：</td>
                <td><input type="text" name="content" class="easyui-textbox" validType="content"
                           data-options="height:120,width:170"></td>
            </tr>


            <div id="btn">
                <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true"
                   data-cmd="save">保存</a>
                <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel">取消</a>
            </div>
        </table>
    </form>
</div>
</body>
</html>
